/**
 * @description: 与位运算判断一个数是否2的n次幂并且计算是多少次幂
 * @author: timlentse(tinglenxan@gmail.com)
 * @Date: 2014-11-11
 */
#include <iostream>

using namespace std;
int log2( int value )
{
	if ( value == 1 )
		return(0);
	else
		return(1 + log2( value >> 1 ) );
}


bool is2Power( int n )
{
	if ( n != 0 )
		return( (n & (n - 1) ) == 0 ? true : false);
	else
		return(false);
}


int main()
{
	int aNumber;
	cin >> aNumber;
	if ( is2Power( aNumber ) )
	{
		cout << aNumber << " is " << log2( aNumber ) << "-th power of 2 " << endl;
	}else  {
		cout << aNumber << " is not N-th power of 2" << endl;
	}
	return(0);
}


